DailyEvaluationViewModel

class DailyEvaluationViewModel @Inject constructor(dailyMoodRepository: DailyMoodRepository) : ViewModel

ViewModel for handling daily mood evaluation operations.

This ViewModel manages the state of the daily evaluation, including submitting the evaluation, navigating through the pages, and updating the selected emotions and their intensities.

Constructors

Link copied to clipboard
@Inject
constructor(dailyMoodRepository: DailyMoodRepository)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
fun emotionSelect(emotion: String)

Toggles the selection of an emotion for the daily evaluation.

Link copied to clipboard
Link copied to clipboard
fun onBack()

Navigates to the previous page of the daily evaluation.

Link copied to clipboard
fun onNext()

Navigates to the next page of the daily evaluation.

Link copied to clipboard
fun onSubmit()

Submits the current daily evaluation by recording the emotions and their intensities.

Link copied to clipboard

Updates the stress level based on the selected emoji.

Link copied to clipboard
fun updateIntensity(value: Float, index: Int)

Updates the intensity of a selected emotion.

Link copied to clipboard

Updates the strongest emotion based on the current selection and intensity.